package com.example.mall.domain;

import java.math.BigDecimal;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.example.mall.util.CodeGenerateUtils;

import java.io.Serializable;

/**
 * <p>
 * 限时折扣表
 * </p>
 *
 * @author whale
 * @since 2025-05-06
 */
@TableName("tb_time_limited_discounts")
public class TimeLimitedDiscounts extends Model<TimeLimitedDiscounts> {

    private static final long serialVersionUID = 1L;

    /**
     * 限时折扣唯一标识
     */
    @TableId("discount_id")
    private Long discountId;
    /**
     * 商品ID
     */
    @TableField("product_id")
    private Long productId;
    /**
     * 折扣价格
     */
    @TableField("discount_price")
    private BigDecimal discountPrice;
    /**
     * 折扣开始时间
     */
    @TableField("start_time")
    private Date startTime;
    /**
     * 折扣结束时间
     */
    @TableField("end_time")
    private Date endTime;
    /**
     * 状态（0：未开始，1：进行中，2：已结束）
     */
    private String status;
    /**
     * 创建时间
     */
    @TableField("create_date")
    private Date createDate;
    /**
     * 更新时间
     */
    @TableField("update_date")
    private Date updateDate;

    public TimeLimitedDiscounts() {
        this.discountId = Long.valueOf(CodeGenerateUtils.generateUniqueId());
    }

    public Long getDiscountId() {
        return discountId;
    }

    public void setDiscountId(Long discountId) {
        this.discountId = discountId;
    }

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public BigDecimal getDiscountPrice() {
        return discountPrice;
    }

    public void setDiscountPrice(BigDecimal discountPrice) {
        this.discountPrice = discountPrice;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }


    @Override
    public String toString() {
        return "TimeLimitedDiscounts{" +
        ", discountId=" + discountId +
        ", productId=" + productId +
        ", discountPrice=" + discountPrice +
        ", startTime=" + startTime +
        ", endTime=" + endTime +
        ", status=" + status +
        ", createDate=" + createDate +
        ", updateDate=" + updateDate +
        "}";
    }
}
